Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds export functionality to chat, removes poetry in favor of uv, bumps Honcho version to v0.0.14/python-SDK-0.0.19 #15

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bLopata
Copy link

@bLopata bLopata commented Jan 7, 2025

Solves dev-552, dev-494, dev-561

Copy link

cloudflare-workers-and-pages bot commented Jan 7, 2025

Deploying yousim with  Cloudflare Pages  Cloudflare Pages

Latest commit: b678112
Status:🚫  Build failed.

View logs

@bLopata bLopata changed the title Adds export functionality to chat, removes poetry in favor of uv. Adds export functionality to chat, removes poetry in favor of uv, bumps Honcho version to v0.0.14/python-SDK-0.0.19 Jan 7, 2025
@bLopata bLopata requested review from VVoruganti and hyusap January 7, 2025 22:15
@bLopata bLopata marked this pull request as ready for review January 7, 2025 22:16
]

# Create a temporary file
with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.json') as tmp:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is writing to disk necessary here? i feel like this could be done in memeory

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or is this already in memory? i've never used this library before, if so, neat trick.

Copy link
Author

@bLopata bLopata Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From python docs
tempfile.TemporaryFile(mode='w+b', buffering=-1, encoding=None, newline=None, suffix=None, prefix=None, dir=None, *, errors=None) Return a [file-like object](https://docs.python.org/3/glossary.html#term-file-like-object) that can be used as a temporary storage area. The file is created securely, using the same rules as [mkstemp()](https://docs.python.org/3/library/tempfile.html#tempfile.mkstemp). It will be destroyed as soon as it is closed (including an implicit close when the object is garbage collected). Under Unix, the directory entry for the file is either not created at all or is removed immediately after the file is created. Other platforms do not support this; your code should not rely on a temporary file created using this function having or not having a visible name in the file system.


services:
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
- "${PORT}:${PORT}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we care about the port within the container?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this more complicated than needed because I was running my honcho fastAPI on (the default) port 8000, so I was specifying here to avoid any problems. I will fix this.

@@ -1,23 +1,25 @@
[tool.poetry]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good riddance haha, uv supremacy

webshell/Dockerfile Outdated Show resolved Hide resolved
RUN npm run build

# Expose the port the app runs on
# Use development server
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use a dev server in this case?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docker container is really used for development. In production we are just serving the static front end. the dev server is really just to make it easy to serve locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants